{literal}
<script type='text/javascript' language='javascript'>

{/literal}
	{$script}
{literal}

	$(document).ready(function(){

		
	});//fecha

</script>
{/literal}
{$mensagem}
{$corpo_html_extrato}

<table width="100%" style="border:1px #AFAFAF solid" cellpadding="1" cellspacing="0">
  <tr>
  	<td colspan="2">
		<table width="100%" cellpadding="3" cellspacing="0">
			<tr>
				<td width="20%" bgcolor="#EBEFF0">
					<img src='{$_site.url}public/images/logo_extrato.gif' border='0' title='Alterar' width='150px'><br>
				</td>
				<td width="60%" align="center" class="bold terra zeta" bgcolor="#EBEFF0">
					RELAT&Oacute;RIO DE UTILIZA&Ccedil;&Atilde;O DE AMBIENTES
				</td>
				<td width="20%" align="right" bgcolor="#EBEFF0" class=" terra bold">
					Data: {$smarty.now|date_format:"%d/%m/%Y"}
				</td>
			</tr>
			<tr>
				<td colspan="3" align="right" height="30" style="border-top:1px #AFAFAF solid;border-bottom:1px #AFAFAF solid">Per&iacute;odo: <b>{$dte_inicio|ConverteData:5}</b> - <b>{$dte_fim|ConverteData:5}</b></td>
			</tr>
		</table>
	</td>
  </tr>
  <tr>
  	{if $bln_mostraservicosopcionais ==  "true"}
    <td width="50%" valign="top" class="paddingRight">
    {else}
    <td width="100%" valign="top">
    {/if}
    <!--
		<fieldset>
		<legend><b>AGENDAMENTOS</b></legend>
		-->
		<div class="terra bold paddingBottom10">Agendamento de Utiliza&ccedil;&atilde;o de ambientes</div>
		<div align="right" class="brod">Num. registros (<b>{$num_agendamendos}</b>)</div>
		<table width="100%" border="0" cellspacing="0" cellpadding="5" class="brod" style="border:1px #AFAFAF solid">
		<tr>
			<td width="30%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Cliente</td>
			<td width="10%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Data</td>
			<td width="20%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Unidade</td>
			<td width="25%" class=" bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Sala</td>
			<td width="15%" class=" bold" bgcolor="#E0ECEF" style="border-bottom:1px #AFAFAF solid;">Periodo</td>
		</tr>
         {assign var='bg1' value='#EBEFF0'}    
		 {assign var='bg2' value=''}
		 {assign var='i' value=1}
		 {section name=lista loop=$agendas} 
		    {foreach from=$agendas[lista] item=agenda key=k}
		     {if $i++ is odd by 1} 
			   {assign var='bgcolor' value=$bg1} 
			{else} 
			   {assign var='bgcolor' value=$bg2} 
			{/if}
			<tr bgcolor="{$bgcolor}">
				<td style="border-left:0px #AFAFAF solid; border-right:1px #AFAFAF solid">({$agenda.contrato_id}) {$agenda.pessoa_nome}</td>
				<td style="border-right:1px #AFAFAF solid">{$agenda.agenda_data}</td>
				<td style="border-right:1px #AFAFAF solid">{$agenda.unidade_nome}</td>
				<td style="border-right:1px #AFAFAF solid">{$agenda.vhr_nome} ({$agenda.tiposala_nome})</td>
				<td style="border-right:0px #AFAFAF solid">{$agenda.agenda_inicio} a {$agenda.agenda_fim}</td>
			</tr>
			{/foreach}
		  {sectionelse}
			<tr>
				<td colspan="5">Nenhum agendamento</td>
			</tr>
		  {/section} 
		<!-- 
		foreach name=lista from=$agenda item=age key=k}
		<tr>
			<td class="bordaFormResp">({$age.contrato_id}) {$age.pessoa_nome}</td>
			<td class="bordaFormResp">{$age.agenda_data}</td>
			<td class="bordaFormResp">{$age.unidade_nome}</td>
			<td class="bordaFormResp">{$age.vhr_nome} ({$age.tiposala_nome})</td>
			<td class="bordaFormResp">{$age.agenda_inicio} - {$age.agenda_fim}</td>
		</tr>
		foreachelse}
		<tr>
			<td colspan="2">Nenhum agendamento</td>
		</tr>
		/foreach}
		-->
		</table><!--
		</fieldset>
	--></td>
	{if $bln_mostraservicosopcionais ==  "true"}
    <td width="50%" valign="top">
		<!--<fieldset>
		<legend><b>SERVICOS DE UTILIZACAO DE AMBIENTES</b></legend>
		-->
		<div class="terra bold paddingBottom10">Lancamento de Servi&ccedil;os Opcionais de utiliza&ccedil;&atilde;o de ambientes</div>
		<div align="right" class="brod">Num. registros (<b>{$num_servicos}</b>)</div>
		<table width="100%" border="0" cellspacing="0" cellpadding="5" class="brod" style="border:1px #AFAFAF solid">
		<tr>
			<td width="35%" class="bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Cliente</td>
			<td width="15%" class="bold" bgcolor="#E0ECEF" style="border-bottom:1px #AFAFAF solid; border-right:1px #AFAFAF solid; ">Data</td>
			<td width="35%" class="bold" bgcolor="#E0ECEF" style="border-right:1px #AFAFAF solid; border-bottom:1px #AFAFAF solid;">Servi&ccedil;o</td>
			<td width="15%" class="bold" bgcolor="#E0ECEF" style="border-bottom:1px #AFAFAF solid;">Qtde. horas</td>
		</tr>
         {assign var='bg1' value='#EBEFF0'}    
		 {assign var='bg2' value=''}
		 {assign var='i' value=1}
		 {section name=lista2 loop=$servicos} 
		    {foreach from=$servicos[lista2] item=servico key=k}
		    {if $i++ is odd by 1} 
			   {assign var='bgcolor' value=$bg1} 
			{else} 
			   {assign var='bgcolor' value=$bg2} 
			{/if}
			<tr bgcolor="{$bgcolor}">
				<td valign="top" class="" style="border-right:1px #AFAFAF solid">({$servico.contrato_id}) {$servico.vhr_nome_pessoa}</td>
		        <td width="200" valign="top" class="" style="border-right:1px #AFAFAF solid">{$servico.dte_data|ConverteData:5}</td>
		        <td valign="top" class="" style="border-right:1px #AFAFAF solid">{$servico.vhr_nome}</td>
		        <td width="200" valign="top" class="" style="border-right:0px #AFAFAF solid" align="center">{$servico.int_quantidade}</td>
			</tr>
		    {/foreach}
		  {sectionelse}
			<tr>
				<td colspan="4">Nenhum lan&ccedil;amento</td>
			</tr> 
		 {/section}
	</td>
	{/if}
  </tr>
</table>